package com.tk.exam.mapper;

import com.tk.exam.domain.TkQuestions;
import com.tk.exam.domain.TkStudentAnswer;
import com.tk.exam.domain.TkStudentAnswerExample;
import java.util.List;

import com.tk.exam.vo.StudentVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

public interface TkStudentAnswerMapper {
    int countByExample(TkStudentAnswerExample example);

    int deleteByExample(TkStudentAnswerExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(TkStudentAnswer record);

    int insertSelective(TkStudentAnswer record);

    List<TkStudentAnswer> selectByExampleWithBLOBsWithRowbounds(TkStudentAnswerExample example, RowBounds rowBounds);

    List<TkStudentAnswer> selectByExampleWithBLOBs(TkStudentAnswerExample example);

    List<TkStudentAnswer> selectByExampleWithRowbounds(TkStudentAnswerExample example, RowBounds rowBounds);

    List<TkStudentAnswer> selectByExample(TkStudentAnswerExample example);

    TkStudentAnswer selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") TkStudentAnswer record, @Param("example") TkStudentAnswerExample example);

    int updateByExampleWithBLOBs(@Param("record") TkStudentAnswer record, @Param("example") TkStudentAnswerExample example);

    int updateByExample(@Param("record") TkStudentAnswer record, @Param("example") TkStudentAnswerExample example);

    int updateByPrimaryKeySelective(TkStudentAnswer record);

    int updateByPrimaryKeyWithBLOBs(TkStudentAnswer record);

    int updateByPrimaryKey(TkStudentAnswer record);

    TkStudentAnswer selectByExamIdAndPaperIdAndStudentId(@Param("examId") Integer examId,@Param("questionId") Integer questionId,@Param("studentId") Integer studentId);

    List<TkStudentAnswer> batchGetAnswerByIdAndStuId(@Param("list")List<Integer> list,@Param(value = "stuId")Integer stuId,@Param(value = "examId")Integer examId);


    List<TkStudentAnswer> selectByExamIdAndStudentId(@Param("examId") Integer examId,@Param("studentId") Integer studentId);

    Integer countByExamIdAndStudentId(@Param("examId") Integer examId,@Param("studentId") Integer studentId);

    List<TkStudentAnswer> selectByExamIdAndTypeAndStudentId(@Param("type") Byte type,@Param("examId") Integer examId,@Param("studentId") Integer studentId);

    Integer searchStudentExamResultNum(@Param("examId") Integer examId,@Param("studentId") Integer studentId);

    Double searchStudentExamTotalScore(@Param("examId") Integer examId,@Param("studentId") Integer studentId);
}